package com.j180.service.impl;

import com.j180.bean.EmpBean;
import com.j180.dao.IEmpDao;
import com.j180.service.IEmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpServiceImpl implements IEmpService {

    @Autowired
    private IEmpDao iEmpDao;

    public void setiEmpDao(IEmpDao iEmpDao) {
        this.iEmpDao = iEmpDao;
    }


    @Override
    public EmpBean showEmp(Long empId) {

        return iEmpDao.getEmp(empId);
    }

    @Override
    public List<EmpBean> showAllEmpsInfo() {
        return iEmpDao.getEmps();
    }
}
